<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Maintainrecords extends Model
{
    //
    protected $table = 'warehouse_maintain_records';


    public function goods()
	{
		return $this->belongsTo('App\Model\Goods','goods_id');
	}
    public function materia()
	{
		return $this->belongsTo('App\Model\MaterialList','material_id');
	}
    public function company()
	{
		return $this->belongsTo('App\Model\Company','company_id');
	}
	public function users()
	{
		return $this->belongsTo('App\Model\Users','user_id');
	}
	public function warehouse_materials()
	{
		// return $this->belongsTo('App\Model\WarehouseMaterials','warehouse_materials_id');
		return $this->belongsTo('App\Model\Stock','warehouse_materials_id');
	}
	 //所属单位分类
	 public function checkcategory()
	 {
		 return $this->belongsTo('App\Model\Checkcategory','checkcategory_id');
	 }
	
}
